package com.huawei.classroom.student.h05;

public class WarFactory extends Building{
	public WarFactory() {
		health=100;
		force=0;
	}
	public Role building(EnumObjectType type) {
		if(type==EnumObjectType.mediumTank)
			return new MediumTank();
		if(type==EnumObjectType.heavyTank)
			return new HeavyTank();
		else {
			System.out.println("Error, only mediumTank or heavyTank");
			return null;
		}
	}
}
